<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
            "http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>



<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<META name="GENERATOR" content="hevea 1.08">
<LINK rel="stylesheet" type="text/css" href="umsroot.css">
<TITLE>
Stream Connection (unix domain)
</TITLE>
</HEAD>
<BODY >
<A HREF="umsroot132.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="umsroot129.html"><IMG SRC ="contents_motif.gif" ALT="Up"></A>
<A HREF="umsroot134.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
<HR>

<H2 CLASS="section"><A NAME="htoc295">21.4</A>&nbsp;&nbsp;Stream Connection (unix domain)</H2>
The sequence of operations is the same as for the internet domain,
however in the unix domain the socket addresses are
the file names:
<BLOCKQUOTE CLASS="quote">
<PRE CLASS="verbatim">
server:
    [eclipse 10]: socket(unix, stream, s), bind(s, '/tmp/sock').

    yes.
    [eclipse 11]: listen(s, 1), accept(s, _, news).
    &lt;blocks waiting for a connection&gt;

client:
    [eclipse 26]: socket(unix, stream, s), connect(s, '/tmp/sock').

    yes.
    [eclipse 27]: printf(s, "%w. %b", message(client)), read(s, Msg).

server:
    [eclipse 12]: read(news, Msg), printf(news, "%w. %b", message(server)).

    Msg = message(client)
    yes.

client:
    Msg = message(server)
    yes.
</PRE></BLOCKQUOTE>
<HR>
<A HREF="umsroot132.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="umsroot129.html"><IMG SRC ="contents_motif.gif" ALT="Up"></A>
<A HREF="umsroot134.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
</BODY>
</HTML>
